<#include "/common/defaultEngine.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="新增ERP付款信息" bodyClass="white-bg" libs=["prism","bootstrapSelect","ueditor"]/>
<div class="wrapper wrapper-content ibox-content">
    <@form.form id="form-pay-add"  class="form-horizontal">
    <input name="applyUserid" value="${user.id}" class="form-control" type="hidden">
    <input name="serialNumber" value="${serNumber}" class="form-control" type="hidden">
    <input name="beneficiaryUserid" class="form-control" type="hidden" value="1">
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "申请人"/>：
       </label>
        <div class="col-sm-8"><input name="applyUsername" class="form-control" type="text" value="${user.name}" readonly="true">
        </div>
     </div>
    <input name="beneficiaryUserid" class="form-control" type="hidden" >
    <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "受益人"/>：
       </label>
        <div class="col-sm-8">
            <input name="beneficiaryUsername" class="form-control" type="text"  required>

        </div>
     </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "选择账户"/>：
       </label>
        <div class="col-sm-8">
            <@form.select name="selectAccount" dictType="sys_erp_select_account" required="true" />
        </div>
     </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "账户余额"/>：
       </label>
        <div class="col-sm-8"><input name="accountBalance" class="form-control" type="number"  required>
        </div>
     </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "金额"/>：
       </label>
        <div class="col-sm-8"><input name="payMoney" class="form-control" type="number"  required>
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "备注"/>：</label>
        <div class="col-sm-8">
            <textarea name="payMemo" class="form-control" required></textarea>
        </div>
    </div>

 </@form.form>
</div>
<@footer>
    <script type="text/javascript">
        var prefix = baseURL + "erp/pay"
        $("#form-pay-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if (opt.validate.form()) {
                opt.operate.save(prefix + "/add", $('#form-pay-add').serialize());
            }
        }
</script>
</@footer>
</@pageTheme>